package com.bocom.controller;


import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.bind.annotation.SessionAttributes;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;
import org.springframework.stereotype.Controller;

import com.bocom.service.UserService;

@Controller
@SessionAttributes("user")
public class loginaction implements Controller {

	@Resource(name="UserService")
	private UserService us;
	
	public ModelAndView handleRequest(HttpServletRequest arg0,
			HttpServletResponse arg1) throws Exception {
		
//		String suc_url = "MyJsp";
//		String fail_url = "MyJsp";

		System.out.println(us);

		System.out.println("Request"+arg0.getParameter("username"));
		System.out.println("TEST 有人来了");
		System.out.println("us.getUserDao()=="+us.userCount());
		//return us.login(suc_url,fail_url,arg0.getParameter("username"),arg0.getParameter("password"));
		return new ModelAndView("MyJsp");
	}

}
